﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Ledict.Core.Data;
using System.Data.Common;
using Ledict.ConditionExtract.Model;

namespace Ledict.ConditionExtract.DAL
{
    public class LogicCaseTypeDocTypeRelationDAL
    {
        #region DAL 
        private string DbName;
        public LogicCaseTypeDocTypeRelationDAL()
        {
            DbName = "JudgeDoc";
        }

        /// <summary>
        /// 获得文书类型
        /// </summary>
        public DataTable GetList()
        {
            string strSql = " Select LCR_ID,LCR_Name,CD_Code FROM Logic_CaseType_DocType_Relation ";          
            Database oBase = DatabaseFactory.CreateDatabase(DbName);
            DbCommand oCmd = oBase.GetSqlStringCommand(strSql.ToString());
            DataTable OtB = oBase.ExecuteDataSet(oCmd).Tables[0];
            if (OtB.Rows.Count > 0)
            {
                return OtB;
            }
            else
            {
                return new DataTable();
            }
        }

        #endregion 


    }
}
